package com.berje.vkalarm;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.util.Log;
import android.widget.Toast;

public class OnAlarmReceiver extends BroadcastReceiver {

	private static final String LOG_TAG = "OnAlarmReceiver";

	@Override
	public void onReceive(Context context, Intent intent) {
		Log.d(LOG_TAG, "onReceive");
		long gid = intent.getLongExtra("gid", 0);
		Log.d(LOG_TAG, "gid: " + gid);
		Toast.makeText(context, "Alarm onReceive! gid " + gid, Toast.LENGTH_LONG).show();

		Log.d(LOG_TAG, "alarmActivityIntent");
		Intent alarmActivityIntent = new Intent();
		alarmActivityIntent.setClass(context, AlarmActivity.class);
		context.startActivity(alarmActivityIntent);
	}

}
